.right-click-panel {
    background-color: var(--color-background-window);
    position: fixed;
    border-radius: .3rem;
    overflow: hidden;
    color: var(--color-text);
    z-index: 10;

    &[tabindex] {
        outline: none;
    }

    .right-click-panel-item {
        width: 6rem;
        height: 1.5rem;
        line-height: 1.5rem;
        padding: 0 1rem;
        font-size: small;
    }
}

/* 左侧列表 */
.left-container {
    width: 30%;
    min-width: 20%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    user-select: none;

    border-right: 1px solid var(--color-border);
}

.left-container-mobile {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;

    border-right: 1px solid var(--color-border);
}

.knock-off-warning {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;

    .warning-window {
        width: 20rem;
        height: 10rem;
        padding: 1rem;
        background-color: var(--color-background);
        border: 1px solid var(--color-border);
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;

        button {
            width: 6rem;
            height: 2rem;
            border: none;
            border-radius: .3rem;
            background-color: rgb(55, 190, 55);
            color: white;
            cursor: pointer;
        }
    }
}

/* left resizer, drag it to resize the left container */
.left-resizer {
    width: .3rem;
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    cursor: ew-resize;
    transition: all .2s;
    z-index: 3;

    &:hover {
        background-color: gray;
        transition-delay: .3s;
    }
}

/* 顶部导航栏 */

.top {
    width: 100%;

    .top-up {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 4.5rem;
        padding: 1rem 1rem 0 1rem;
    }

    .top-left {
        position: relative;
        display: flex;
        align-items: center;
        gap: .5rem;

        .top-left-name {
            display: flex;
            flex-direction: column;
            /* align-items: center; */
            justify-content: center;
        }

        .connection-state {
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }

    .top-right {
        display: flex;
        align-items: center;
        gap: 1rem;

        svg {
            width: 1.5rem;
            height: 1.5rem;
        }

        >span {
            border-radius: .4rem;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;

            .unread-count {
                width: 1rem;
                height: 1rem;
                position: absolute;
                border-radius: 50%;
                top: 0;
                right: 0;
                background-color: red;
                display: flex;
                justify-content: center;
                align-items: center;
                color: white;
                font-size: small;
            }
        }

        .icon {
            cursor: pointer;
        }


    }


    .top-down {
        display: flex;
        align-items: center;
        width: 100%;
        height: 2rem;
        gap: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        margin-top: 1rem;

        .top-down-style {
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 1rem;
        }

    }

    .top-icon-selected {
        color: white;
        background-color: rgb(250, 92, 92);
    }

    .top-icon {
        color: var(--color-text);
    }
}

/* 左侧列表，包含会话列表，联系人列表 */

.left-down {
    width: 100%;
    height: 100%;
    overflow: hidden;

    .slider {
        width: 200%;
        height: 100%;
        display: flex;
        transition: all 0.2s ease-in-out;

        .list-wrapper {
            width: 50%;
            position: relative;


        }
    }

}

/* 列表 */

.contacts-list {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    height: calc(100% - 4rem);
    padding-bottom: 1rem;
    overflow-y: auto;

    .hint {
        text-align: center;
        color: white;
    }

    .no-result {
        width: 100%;
        height: 2rem;
        line-height: 2rem;
        text-align: center;
    }

    .new-friends {
        width: calc(100% - 2rem);
        height: 2rem;
        line-height: 2rem;
        margin: 0 1rem 1rem;
        padding-left: 1rem;
        border-top: 1px solid var(--color-border);
        border-bottom: 1px solid var(--color-border);
    }

    .hover {
        &:hover {
            background-color: var(--hover-color);
        }
    }

    .top-pinned-conversation {
        background-color: var(--color-background-pinned);
    }

    /* selected color need to be under the pinned color */
    .selected {
        background-color: var(--hover-color);
    }


    .item {
        width: 100%;
        height: 4rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        /* border: black 1px solid; */

        .item-avatar {
            width: calc(4rem - 1rem);
            height: calc(4rem - 1rem);
            background-color: azure;
            border-radius: .3rem;
            display: grid;
            grid-template-columns: repeat(var(--avatar-column), 1fr);
            gap: .2rem;

            .avatar {
                place-self: center;
                width: 100%;
                height: auto;
            }
        }

        .item-info {
            width: calc(100% - 4rem);
            display: flex;
            flex-direction: column;
            position: relative;

            .unread-count {
                width: 1.2rem;
                height: 1.2rem;
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: red;
                border-radius: 50%;
                color: white;
                font-size: .6rem;
                font-weight: bold;
                position: absolute;
                top: 1.5rem;
                right: .5rem;
            }

            .unread-count-mute {
                width: 3.2rem;
                height: 1.2rem;
                display: flex;
                justify-content: end;
                align-items: center;
                color: var(--color-text);
                font-size: .6rem;
                position: absolute;
                top: 1.5rem;
                right: .5rem;
            }

            .name-time {
                width: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;
                font-size: large;

                &:first-child {
                    overflow: hidden;
                    text-overflow: ellipsis;
                    word-break: keep-all;
                    white-space: nowrap;
                }

                .time {
                    font-size: .5rem;
                }
            }

            .remark {
                width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                word-break: keep-all;
                font-size: .8rem;
                color: var(--color-text);
                white-space: nowrap;
            }
        }
    }
}

.user-info {
    width: 100%;
    display: flex;
    flex-direction: column;

    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;


    .friend-card-header {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 1rem;
    }

    .friend-card-avatar {
        width: 3rem;
        height: 3rem;
        border-radius: .3rem;
    }

    .friend-card-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        word-wrap: break-word;
        overflow: hidden;
        white-space: pre-wrap;

        &:not(:first-child) {
            color: var(--color-text);
        }
    }

    .friend-card-body {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

        button {
            border: none;
            border-radius: .2rem;
            background-color: #e4e9ec;
            width: 6rem;
            height: 2rem;
            padding: auto;
            cursor: pointer;
        }

        .apply-detail {
            width: 100%;
            height: auto;
            display: flex;
            flex-direction: column;
            gap: 1rem;

            .apply-input {
                /* border-radius: .3rem; */
                outline: none;
                padding: 0 .3rem;
                /* font-size: 1rem; */
            }

            > :first-child,
            > :nth-child(2) {
                display: grid;
                grid-template-columns: 1fr 2fr;
            }

            > :last-child {
                display: grid;
                grid-template-columns: 1fr 1fr;
                justify-items: center;
            }
        }
    }
}

/* 隐藏滚动条 */

.contacts-list::-webkit-scrollbar {
    display: none;
}


/* 控制联系人左移 */
.move-left {
    transform: translateX(-50%);
}

/* 列表结束 */
